---
title: schema-ast
description: Generate an AST representation of your GraphQL schema. This plugin is used internally by other plugins.
---

import { PluginApiDocs, PluginHeader } from '@/components/plugin'
import { pluginGetStaticProps } from '@/lib/plugin-get-static-props'
export const getStaticProps = pluginGetStaticProps(__filename)

<PluginHeader />

## Examples

```ts filename="codegen.ts"
import type { CodegenConfig } from '@graphql-codegen/cli'

const config: CodegenConfig = {
  // ...
  schema: ['http://localhost:3000/graphql', './src/**/*.graphql', 'scalar MyCustomScalar'],
  generates: {
    'path/to/file.graphql': {
      plugins: ['schema-ast']
    }
  }
}
export default config
```

<PluginApiDocs />
